<!DOCTYPE html>
<html lang="en" xmlns:th="https://www.thymeleaf.org">
<head>
<!--    <meta charset="UTF-8">-->
<!--    <title>登录</title>-->

<!--    <link rel="stylesheet" href="/bootstrap/css/bootstrap.min.css">-->
<!--    <link rel="stylesheet" href="/bootstrap/css/resgister.css">-->

  <!-- 新 Bootstrap 核心 CSS 文件 -->
  <link href="https://apps.bdimg.com/libs/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">

  <!-- 可选的Bootstrap主题文件（一般不使用） -->
  <script src="https://apps.bdimg.com/libs/bootstrap/3.2.0/css/bootstrap-theme.min.css"></script>

  <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
  <script src="https://apps.bdimg.com/libs/jquery/1.11.1/jquery.min.js"></script>

  <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
  <script src="https://apps.bdimg.com/libs/bootstrap/3.2.0/js/bootstrap.min.js"></script>

</head>
<body>
<main class="main" role="main">
    <div class="container">
        <div class="row">
            <div class="col-md-4 col-md-offset-4">

                <form class="form-container" th:action="@{/users}" method="get" th:object="${user}">
                    <h2>用户登录</h2>
                    <div class="form-group">
                        <label>账号</label>

                        <input type="text" th:field="*{username}" class="form-control" name="username"  placeholder="请输入账号" required="required">
                    </div>

                    <div class="form-group">
                        <label>密码</label>

                        <input type="password" th:field="*{password}" class="form-control" name="password"  placeholder="请输入密码" required="required" >
                    </div>

                    <span class="help-inline">
                      <div th:if="${#fields.hasAnyErrors()}">
                        <p th:each="err : ${#fields.allErrors()}" th:text="${err}" style="color:red">Error</p>
                      </div>
                    </span>

                    <button type="submit" class="btn btn-info btn-block" >登录</button>
                </form>
            </div>
        </div>

    </div>
</main>
<!--<script src="/bootstrap/js/bootstrap.min.js"></script>-->
</body>
</html>
